ALTER          proc sp_create_inventory_lot_for_finished_goods (

@process_step_id int, 
@location_id int,
@lot_number varchar(50), 
@qty_in int,
@qty_out int,
@date_in datetime,
@date_out datetime,
@date_code_V varchar(20))

as
begin
	declare @part_number_V varchar(25), @l_vendor_name_V varchar(25)
	select  @part_number_V =Part_Number from Product where ProcessStep_ID = @process_step_id
	select @l_vendor_name_V=L_Vendor_Name from location where Location_ID= @location_id
	-- the proc below is run for the adaptors and hence the same should also be used here.
	exec  sp_create_update_fg_lot @part_number_V, @lot_number, @qty_in,@qty_out, @date_in,@date_out,
					'Finished Goods',@l_vendor_name_V, @date_code_V
end

